package com.servlet.demo.enums;

/**
 * 用户类型
 */
public enum UserType {
    ADMIN(1, "管理员"),
    USER(2,"普通用户");

    private Integer id;
    private String name;

    UserType(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public String toString() {
        return String.format("{id:%d,name:%s}", id, name);
    }
}
